package com.fengycx.controller;

import com.fengycx.pojo.dto.DriverPointDto;
import com.fengycx.result.R;
import com.fengycx.service.IDriverGeoService;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/driver/geo")
public class DriverGeoController {

    @Autowired
    private IDriverGeoService dataService;

    @Operation( summary= "实时存储司机坐标",description = "实时存储司机坐标接口")
    @PostMapping("/cacheDriverLocation")
    public R<Void> cacheDriverLocation(@RequestBody DriverPointDto driverPointDto){
        dataService.cacheDriverLocation(driverPointDto);
        return R.success();

    }

}
